/*
 * 文件名：IUserDAO.java
 * 版权：Copyright by www.wootide.com
 * 描述：用户DB层类接口
 * 修改人：lizl
 * 修改时间：2012-9-12
 * 跟踪单号：
 * 修改单号：
 * 修改内容：
 */
package com.wootide.cms.manager.dao;

import java.util.List;

import com.wootide.cms.common.manager.SHException;
import com.wootide.cms.manager.pojo.User;


/**
 * 〈一句话功能简述〉用户DB层接口
 * 〈功能详细描述〉
 *  【说明】：DB层：insert/delete/update/query——DB层的增删改查;
 * @author lizl
 * @version 2012-9-12
 * @see IUserDAO
 * @since
 */

public interface IUserDAO
{
    /**
     * Description: 向DB插入数据记录<br>
     * Implement: 实现类：UserDAOImpl<br>
     * @param user
     * @see
     * @return void
     * @author lizl
     */
    public void insertUser(User user) throws Exception;
    
    /**
     * Description: 修改DB中的数据记录<br>
     * Implement: 实现类：UserDAOImpl<br>
     * @param user
     * @see
     * @return void
     * @author lizl
     */
    public void updateUser(User user) throws Exception;
    
    /**
     * Description: 通过ID在DB中查询数据<br>
     *     1.将传入的对象进行解析，封装成SQL或者PLSQL语句，<br>
     *     再与数据库进行交互，获取相应的数据记录集合；<br>
     *     2.【查询约束条件】？？<br>
     * Implement: 实现类：UserDAOImpl<br>
     * @param user
     * @return
     * @see
     * @return User
     * @author lizl
     */
    public User queryUserById(User user) throws Exception;
    
    /**
     * Description: <根据条件查询数据记录br>
     * Implement: 实现类：UserDAOImpl<br>
     * @param user
     * @return
     * @see
     * @return List<User>
     * @author lizl
     */
    public int queryUser(User user) throws Exception;
    
    /**
     * 
     * Description: 用户授权<br>
     * Implement: <br>
     * @param user
     * @param role
     * @throws Exception
     * @see
     * @return void
     * @author Administrator
     */
    //public void grantUser(User user, Role role) throws Exception;
    
    /**
     * Description: 启动某个用户<br>
     * Implement: <br>
     * @param user
     * @see
     * @return void
     * @author lizl
     */
    public void startUser(User user) throws Exception;
    
    /**
     * Description: 停用某个用户<br>
     * Implement: <br>
     * @param user
     * @see
     * @return void
     * @author lizl
     */
    public void stopUser(User user) throws Exception;
    
    /**
     * Description: 用户分页查询，获取第几页的结果集合记录<br>
     * Implement: <br>
     * @param user：查询条件对象
     * @param start：UI界面显示的开始位置
     * @param pageSize：每页显示最大记录条数
     * @return
     * @throws SHException
     * @see
     * @return List<User>：返回某页的结果记录集合
     * @author Administrator
     */
    public List<User> getUserList(User user, int start, int pageSize)
            throws SHException;
    
    /**
     * 根据属性查询user
     * Description: <br>
     * Implement: <br>
     * @param paramMap
     * @return
     * @throws SHException
     * @see
     * @return User
     * @author qianfm
     */
    public User getUser(User user) throws SHException;
    
    /**
     * Description:  获取所有用户<br>
     * Implement: <br>
     * @return
     * @throws SHException
     * @see
     * @return List<User>
     * @author Administrator
     */
    public List<User> getAllUsers() throws SHException;
     
}
